/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package canteen.sys.model.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author TNT
 */
@Entity
public class DepartmentMaster implements Serializable {

    @Id
    @GeneratedValue
    private int deptId;
    @NotNull
    @Size(min = 2, max = 50, message = "Name Department must >=2 or <=50 character")
    @Column(length = 50,unique=true)
    private String departmentName;
    @NotNull
    private boolean status;

    public DepartmentMaster(int deptId, String departmentName, boolean status) {
        this.deptId = deptId;
        this.departmentName = departmentName;
        this.status = status;
    }

    public DepartmentMaster() {
    }

    public int getDeptId() {
        return deptId;
    }

    public void setDeptId(int deptId) {
        this.deptId = deptId;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }
}
